package com.ruoyi.data.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.data.domain.TdataRtWgc;
import com.ruoyi.data.service.ITdataRtWgcService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/data/htwgc")
@Api(tags = "告警管理-违规报警")
public class TdataRtWgcController extends BaseController {

    @Resource
    private ITdataRtWgcService tdataRtWgcService;

    /**
     * 查询违规报警列表
     */
    @GetMapping("/list")
    @ApiOperation("查询违规报警列表")
    public TableDataInfo<TdataRtWgc> list(TdataRtWgc tdataRtWgc) {
        startPage();
        List<TdataRtWgc> list = tdataRtWgcService.selectRtWgcList(tdataRtWgc);
        return getDataTable(list);
    }

    /**
     * 通讯故障列表
     */
    @GetMapping("/txList")
    @ApiOperation("通讯故障列表")
    public TableDataInfo<TdataRtWgc> txgzList(TdataRtWgc tdataRtWgc) {
        startPage();
        List<TdataRtWgc> list = tdataRtWgcService.selectTxgzList(tdataRtWgc);
        return getDataTable(list);
    }

}
